package com.zn.events
{
    import flash.events.Event;

    public class ArrayCollectionEvent extends Event
    {
        public static const ADD:String = "add";

        public static const REMOVE:String = "remove";

        public static const REPLACE:String = "replace";

        public static const CHANGE:String = "change";

        private var _index:int;

        private var _value:Object;

        private var _oldValue:Object;

        public function ArrayCollectionEvent(type:String, index:int = -1, value:Object = null, oldValue:Object = null,
                                             bubbles:Boolean = false, cancelable:Boolean = false)
        {
            super(type, bubbles, cancelable);

            _index = index;
            _value = value;
            _oldValue = oldValue;
        }

        public override function clone():Event
        {
            return new ArrayCollectionEvent(type, _index, _value, _oldValue, bubbles, cancelable);
        }

        public function get index():int
        {
            return _index;
        }

        public function get value():Object
        {
            return _value;
        }

        public function get oldValue():Object
        {
            return _oldValue;
        }

    }
}